package com.neu.questionnaireplus.dao;

import com.neu.questionnaireplus.entity.Tenement;
import java.util.List;
import org.springframework.stereotype.Repository;

@Repository
public interface TenementDao {

  /**
   * @Description: 查询所有租户
   * @Param: []
   * @return: java.util.List<com.neu.questionnaireplus.entity.Tenement>
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/30
   */
  List<Tenement> queryTenement();

  /**
   * @Description: 查询未被删除的租户
   * @Param: []
   * @return: java.util.List<com.neu.questionnaireplus.entity.Tenement>
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/31
   */
  List<Tenement> queryExistTenement();

  /**
   * @Description: 模糊查询租户
   * @Param: [tenement]
   * @return: java.util.List<com.neu.questionnaireplus.entity.Tenement>
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/30
   */
  List<Tenement> selectTenementList(Tenement tenement);

  /**
   * @Description: 根据id查询租户并返回
   * @Param: [id]
   * @return: com.neu.questionnaireplus.entity.Tenement
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/30
   */
  Tenement queryTenementByID(String id);

  /**
   * @Description: 插入一个Tenement进数据库
   * @Param: [tenement]
   * @return: boolean
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/30
   */
  int insertTenement(Tenement tenement);

  /**
   * @Description: 根据id更新租户
   * @Param: [tenement]
   * @return: boolean
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/30
   */
  int updateTenement(Tenement tenement);

  /**
   * @Description: 根据id删除租户
   * @Param: [id]
   * @return: boolean
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/30
   */
  int deleteTenement(String id);

  /**
   * @Description: 根据电话查询租户对象
   * @Param: [telnumber]
   * @return: com.neu.questionnaireplus.entity.Tenement
   * @Author: ~FHX~ (:TSunS:)
   * @Date: 2022/10/30
   */
  Tenement queryTenementByPhone(String telnumber);
  
  /** 
  * @Description: 通过用户名精确查询租户
  * @Param: [username] 
  * @return: com.neu.questionnaireplus.entity.Tenement 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/31 
  */ 
  Tenement queryTenementByUsername(String username);

  /**
  * @Description:  通过用户名模糊查询租户
   * @Param: [username]
  * @return: com.neu.questionnaireplus.entity.Tenement
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/10/31
  */
  List<Tenement> queryTenementByName(String username);

  /** 
  * @Description: 通过手机号精确查找租户
   * @Param: [telnumber] 
  * @return: com.neu.questionnaireplus.entity.Tenement 
  * @Author: ~FHX~ (:TSunS:)
  * @Date: 2022/11/2 
  */ 
  Tenement queryTenementByTelnumber(String telnumber);

}
